<template>
  <div>
    <p>商品列表</p>
    <router-link v-for="(item, index) in goodslist" :key="index" :to='`/details/`+item.name'>
      <p>
        {{ item.name }}
      </p></router-link
    >
  </div>
</template>

<script>
export default {
  data() {
    return {
      goodslist: [
        { name: "Xiaomi 11" },
        { name: "Xiaomi 10" },
        { name: "Xiaomi 9" },
      ],
    };
  },
};
</script>

<style>
</style>